package casa.depesos.app.com.http.data;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class Extend implements Parcelable {

    @SerializedName("apsum")
    @Expose
    public String amount;

    @SerializedName("loanedAmt")
    @Expose
    public String extend;

    @SerializedName("lref")
    @Expose
    public String no;

    @SerializedName("lastPayDate")
    @Expose
    public String lastDate;

    @SerializedName("totalRemainingExtend")
    @Expose
    public float remain;

    @SerializedName("totalActualExtend")
    @Expose
    public float indeed;

    @SerializedName("serviceFeeExtend")
    @Expose
    public float fee;

    @SerializedName("serviceVATExtend")
    @Expose
    public float vat;

    protected Extend(Parcel in) {
        amount = in.readString();
        extend = in.readString();
        no = in.readString();
        lastDate = in.readString();
        remain = in.readFloat();
        indeed = in.readFloat();
        fee = in.readFloat();
        vat = in.readFloat();
    }

    public static final Creator<Extend> CREATOR = new Creator<Extend>() {
        @Override
        public Extend createFromParcel(Parcel in) {
            return new Extend(in);
        }

        @Override
        public Extend[] newArray(int size) {
            return new Extend[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(amount);
        dest.writeString(extend);
        dest.writeString(no);
        dest.writeString(lastDate);
        dest.writeFloat(remain);
        dest.writeFloat(indeed);
        dest.writeFloat(fee);
        dest.writeFloat(vat);
    }
}
